<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>VUE</title>
</head>
<body>
<div id="app">
    <p v-if="see">现在你看到我了</p>
</div>


<input type="button" value="get" class="get">
<input type="button" value="post" class="post">

<input type="button" value="get" id="id1">
<!-- 开发环境版本，包含了有帮助的命令行警告 -->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
   document.querySelector(".get").onclick=function (){
       axios.get("https://autumnfish.cn/api/joke/list?num=3").
           then(function (response){
               console.log(response)
       })
   }
   document.getElementById("id1").onclick=function (){
       axios.get("https://autumnfish.cn/api/joke/list?num=3").
       then(function (response){
           console.log(response)
       })
   }
   document.querySelector(".post").onclick=function (){
       axios.post("https://autumnfish.cn/api/user/reg",{username:"wang"}).
       then(function (response){
           console.log(response)
       })
   }
</script>

</body>
</html>